package com.example.gokchinesefoodmappcdev.service.impl;


import com.example.gokchinesefoodmappcdev.dao.SysRoleDao;
import com.example.gokchinesefoodmappcdev.entity.SysRole;
import com.example.gokchinesefoodmappcdev.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Autowired
    SysRoleDao roleDAO;

    @Override
    public List<SysRole> findRolesByUserName(String userName) {

        return roleDAO.findRolesByUserName(userName);
    }

    @Override
    public List<SysRole> findRolesByMenuId(Integer menuId) {
        return roleDAO.findRolesByMenuId(menuId);
    }
}
